@import '~@kdcloudjs/kdesign/dist/kdesign-complete.less';

.ellipsisMultiple(@n: n) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: @n;
  -webkit-box-orient: vertical;
}

.home {
  .row {
    &:not(:last-child) {
      margin-bottom: 10px;
    }
  }

  .banner {
    height: 100%;
    overflow: hidden;
    border-radius: 4px;

    :global {
      .kd-carousel-list-item {
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        overflow: hidden;
      }

      .kd-carousel-slidebar {
        left: auto;
        transform: none;
        right: 10px;

        .kd-carousel-slidebar-dot {
          margin: 0 1px;

          > button {
            width: 6px;
            height: 6px;
            opacity: 0.5;
            background-color: #fff;
            border-radius: 50%;
          }
        }

        .kd-carousel-slidebar-dot-active > button {
          opacity: 1;
          background-color: #fff;
        }
      }
    }
  }

  .banneritem {
    position: relative;

    img {
      height: 138px;
      border-radius: 4px;
    }

    > div {
      position: absolute;
      color: white;
      left: 280px;
      top: 65px;
      font-family: PingFangSC-Medium, PingFang SC;

      &:nth-child(2) {
        font-size: 26px;
        top: 26px;
        font-weight: 800;
      }

      &:nth-child(3) {
        font-size: 12px;
      }
    }
  }

  .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 6px 16px;
    background-color: @bg;
    border-radius: 4px;
    color: #333;

    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 0;
      font-size: @font-size-large;
    }

    .data {
      margin: 6px 0 16px;

      .count {
        line-height: 60px;
        font-size: 48px;
        text-align: center;
      }

      .status {
        line-height: 20px;
        font-size: @font-size-middle;
        text-align: center;
      }

      strong {
        color: @color-warning;
      }
    }

    .boot {
      display: flex;
      flex-wrap: wrap;
      margin-bottom: 20px;

      li {
        flex: 0 0 25%;
        margin-top: 16px;
        color: @color-text-secondary;
        font-size: @font-size-small;
        line-height: 20px;
        text-align: center;
        cursor: pointer;

        img {
          margin-bottom: 6px;
        }

        span {
          .ellipsisMultiple(2);
        }
      }
    }

    .funds {
      margin-top: 6px;
      background-color: #fff;

      .fund {
        header {
          display: flex;
          align-items: center;
          padding: 8px 0 10px;
          border-bottom: 1px dashed rgba(230, 232, 238, 1);

          .tit {
            display: flex;
            flex-direction: column;
            flex: auto;
            margin: 0 12px;

            .name {
              margin-bottom: 4px;
              font-size: 14px;
              color: #1d1d1d;
              line-height: 20px;
            }

            .code {
              font-size: 12px;
              color: #999;
              line-height: 16px;
            }
          }
          .titimg {
            position: relative;
            img {
              height: 60px;
              margin-top: -12px;
            }
            div {
              font-size: 11px;
              position: absolute;
              color: #f88a8a;
              top: 4px;
              left: 13px;
              transform: rotate(-22deg);
              text-overflow: ellipsis;
              overflow: hidden;
              white-space: nowrap;
              width: 60px;
            }
          }
        }

        .attr {
          padding: 8px 0 6px 0px;
          line-height: 20px;
          color: #333;
          font-size: @font-size-middle;

          li {
            display: flex;
            align-items: center;
            justify-content: center;
          }

          li:not(:last-child) {
            margin-bottom: 4px;

            div {
              margin-right: 10px;
            }
          }

          label {
            display: inline-block;
            color: #999;
            text-align: right;
            white-space: nowrap;
          }
        }
      }
    }

    .bills {
      margin-top: 6px;

      li {
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 15px 0 12px;
        color: #999;
        line-height: 16px;
        font-size: @font-size-small;

        &:not(:last-child) {
          border-bottom: 1px solid #e6e8ee;
        }

        .name {
          line-height: 20px;
          color: #333;
          font-size: @font-size-middle;
        }

        .code {
          margin: 4px 0 12px;
        }

        .time strong {
          font-weight: normal;
        }

        .status {
          position: absolute;
          top: 16px;
          right: 0;

          &::before {
            position: absolute;
            top: 50%;
            left: -8px;
            content: '';
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background-color: #ccc;
            transform: translateY(-50%);
          }

          &.green {
            color: #18bc71;

            &::before {
              background-color: #18bc71;
            }
          }
        }
      }
    }

    .news {
      margin-top: 6px;

      li {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        cursor: pointer;

        &:not(:last-child) {
          border-bottom: 1px solid #e6e8ee;
        }

        .left {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          flex: auto;
          margin-right: 10px;

          h4 {
            margin: 0;
            font-size: @font-size-middle;
            color: #333;
            line-height: 20px;
            font-weight: normal;
            .ellipsisMultiple(2);
          }

          span {
            display: block;
            font-size: @font-size-small;
            color: #999;
            line-height: 16px;
            .ellipsisMultiple(2);
          }
        }
      }
    }
  }
}
